<?php if(is_array($items) && !empty($items)){?>
<dl style="position: relative;">
<?php foreach ($items as $key => $photo) {?>
<dt style="<?php echo "display: inline; width: ".($params['width']+33)."px; margin: {$params['margin']}px; z-index: 90;" ?>">
	<?php 
		$thumb = $this->Html->url('/', true).str_replace(' ',"%20",$fileUpload->image($photo['StoreUpload']['name'],array('autoResize'=>true,'width'=>$params['width'],'imagePathOnly'=>true)));
	?>	
	<?php echo $this->Html->link("&nbsp;",$photo['StoreProduct']['www'],
		array('escape'=>false,'class'=>"highslide", 'title'=>$photo['StoreProduct']['name'], 'style'=>"background: url(".$thumb.") center no-repeat; display: block; text-decoration:none; width: ".($params['width']+10)."px; height: ".($params['height']+10)."px; padding: {$params['padding']}px;  border: solid {$params['border']}px #d2d2d2; background-position: center; background-repeat: no-repeat; float: left; overflow: hidden;")); ?>

	<?php if($photo['StoreProduct']['price_przecena'] > 0 && $photo['StoreProduct']['price_promocja'] == 0){?>
			<?php $price = "<span style=\" text-decoration: line-through; color: #ffffff;\">".$this->Store->price($photo['StoreProduct']['price_detaliczna'],2,'','',$photo['StoreProduct']['currency_id'],$photo['StoreCurrency']['exchange'],$photo['StoreCurrencyDefault']['id'],$photo['StoreCurrencyDefault']['exchange'])."</span>"; ?>			 
			<?php $price .= "<span style=\"text-decoration: none; font-size: 15px; font-weight: bold; color: #ffffff;\"> ". $this->Store->price($photo['StoreProduct']['price_przecena'],2,'',null,$photo['StoreProduct']['currency_id'],$photo['StoreCurrency']['exchange'],$photo['StoreCurrencyDefault']['id'],$photo['StoreCurrencyDefault']['exchange'])."</span> ";?>
			
	<?php }else if( $photo['StoreProduct']['price_promocja'] > 0){?>
			<?php $price = "<span style=\" text-decoration: line-through; color: #ffffff;\">".$this->Store->price($photo['StoreProduct']['price_detaliczna'],2,'','',$photo['StoreProduct']['currency_id'],$photo['StoreCurrency']['exchange'],$photo['StoreCurrencyDefault']['id'],$photo['StoreCurrencyDefault']['exchange'])."</span>";?>			 
			<?php $price .= "<span style=\"text-decoration: none; font-size: 15px; font-weight: bold; color: #ffffff;\"> ".$this->Store->price($photo['StoreProduct']['price_promocja'],2,'',null,$photo['StoreProduct']['currency_id'],$photo['StoreCurrency']['exchange'],$photo['StoreCurrencyDefault']['id'],$photo['StoreCurrencyDefault']['exchange'])."</span> ";?> 
			
	<?php }else{?>
			<?php $price = "<span style=\"text-decoration: none; font-size: 15px; font-weight: bold; color: #ffffff;\">".$this->Store->price($photo['StoreProduct']['price_detaliczna'],2,'',null,$photo['StoreProduct']['currency_id'],$photo['StoreCurrency']['exchange'],$photo['StoreCurrencyDefault']['id'],$photo['StoreCurrencyDefault']['exchange'])."</span>";?>
	<?php }?>
	
	<?php echo $this->Html->link($price, $photo['StoreProduct']['www'],array('escape'=>false,'style'=>"display: block; text-align: left; color: #fff; font-size: 14px;  text-decoration: none; background: url(".$this->Html->url('/', true)."img/".HOST."/button.png) top left no-repeat;    border: none; background-position: center; background-repeat: no-repeat; float: left; overflow: hidden;  width: 150px; height: 19px; padding: 3px 0px 0px 10px; margin: 0px;")); ?>

</dt>
<?php }?>
</dl>
<div style="clear:both; padding:0; margin:0; background:none;"></div>
<?php }?>